﻿using System;
using System.Collections.Generic;
using System.Text;


//public partial class Pet
//{
//    public int lastUpdateHp => m_LastUpdateHp;

//    public void UpdateId(long id)
//    {
//        m_Id = id;
//    }
//    public Pet(long id,int petId, int usedSkinIndex,int power,PropertyProportion propertyProportion,int hpLastUpdate,double hpUpdateTime,double woundTime,int mood,int hpMax , int continueLoseCount,ConstData ConstData)
//    {
//        this.m_Id = id;
//        this.m_PetId = petId;
//        this.m_Power = power;
//        this.m_PropertyProportion = propertyProportion;
//        this.m_LastUpdateHp = hpLastUpdate;
//        this.m_HpUpdateTime = hpUpdateTime;
//        this.m_MaxHp = hpMax;
//        this.m_Mood = mood;
//        this.m_CurSkinIndex = usedSkinIndex;
//        this.m_WoundTime = woundTime;
//        this.m_ContinueLoseCount = continueLoseCount;

//        defaultAddOneHpSeconds = ConstData.battleRules.addOneHpSeconds;

//        InitSkins(arche);
//    }

//    void InitSkins(PetArche arche)
//    {
//        SkinArche[] petSkinArches = System.Array.FindAll(ConstData.Instance.skins, e => e.petId == arche.petId);

//        m_Skins = petSkinArches.Map(e => e.skinId).AsArray();
//    }

//    public int AddPower(int addPower)
//    {
//        m_Power += addPower;
//        if(m_Power <= 0)
//        {
//            m_Power = 0;
//        }
//        return m_Power;
//    }

//    public int AddMood(int addMood)
//    {
//        m_Mood += addMood;
//        if (m_Mood >= Pet.maxMood)
//        {
//            m_Mood = Pet.maxMood;
//        }
//        return m_Mood;
//    }

//    public void SetContinueLoseCount(int count)
//    {
//        this.m_ContinueLoseCount = count;
//    }
//}



//public partial class Prop
//{

//    public int Add(int addNum)
//    {
//        int num = this.m_Num + addNum;
//        num = UpdateNum(num);

//        return num;
//    }
    
//    public int UpdateNum(int _num)
//    {
//        _num = _num < 0 ? 0 : _num;
//        this.m_Num = _num;

//        return m_Num;
//    }

//}

//public partial class Skin
//{
//    public void UpdateId(long id)
//    {
//        m_Id = id;
//    }
//}
public partial class UserInfo
{
    public UserInfo(long userId,
    int gender,//true: Man, false: woman
    string name,
    int birthYear,
    int birthMonth,
    int birthDay,
    string status,
    string locationProvince,
    string locationCity,
    string hometownProvince,
    string hometownCity,
    string job,
    string company,
    int eduation,
    string school,
    float height,
    float weight,
    int income,
    byte realNameVerify,
    byte jobVerify,
    byte eduVerify,
    string aboutMe,
    string familyBackground,
    string interest,
    string loveView,
    string idealCompanion,
    long[] followers,
    string icon,
    string tex1,
    string tex2,
    string tex3,
    string tex4,
    string tex5,
    string tex6)
    {
        this.userId = userId;
        this.gender = gender;
        this.name = name;
        this.birthYear = birthYear;
        this.birthMonth = birthMonth;
        this.birthDay = birthDay;
        this.status = status;
        this.locationProvince = locationProvince;
        this.locationCity = locationCity;
        this.hometownProvince = hometownProvince;
        this.hometownCity = hometownCity;
        this.job = job;
        this.company = company;
        this.eduation = eduation;
        this.school = school;
        this.height = height;
        this.weight = weight;
        this.income = income;
        this.realNameVerify = realNameVerify > 0 ? true : false;
        this.jobVerify = jobVerify > 0 ? true : false;
        this.eduVerify = eduVerify > 0 ? true : false;
        this.aboutMe = aboutMe;
        this.familyBackground = familyBackground;
        this.interest = interest;
        this.loveView = loveView;
        this.idealCompanion = idealCompanion;
        this.icon = icon;
        this.tex1 = tex1;
        this.tex2 = tex2;
        this.tex3 = tex3;
        this.tex4 = tex4;
        this.tex5 = tex5;
        this.tex6 = tex6;
    }
}

public partial class Moment
{
    public Moment(long userId, long momentId, long time, string content, string location, string topic, List<long> likes, List<Comment> comments, string[] texs)
    {
        this.userId = userId;
        this.momentId = momentId;
        this.time = time;
        this.content = content;
        this.location = location;
        this.topic = topic;
        this.likes = likes;
        if (this.likes == null)
            this.likes = new List<long>();
        this.comments = comments;
        if (this.comments == null)
            this.comments = new List<Comment>();
        this.texs = texs;
    }
}

public partial class Comment
{
    public Comment(long momentUserId,long momentId, long commentId, MiniUserInfo miniUserInfo, string content, List<long> likes, long time, List<SubComment> subComments)
    {
        this.commentId = commentId;
        this.momentUserId = momentUserId;
        this.momentId = momentId;
        this.miniUserInfo = miniUserInfo;
        this.content = content;
        this.likes = likes == null ? new List<long>() : likes;
        this.time = time;
        this.subComments = subComments == null ? new List<SubComment>() : subComments;
    }
}

public partial class Moment
{
    public Moment(long userId, long momentId, long time, string content, string location, string topic, int status, List<long> likes, List<Comment> comments, string[] texs)
    {
        this.userId = userId;
        this.momentId = momentId;
        this.time = time;
        this.content = content;
        this.location = location;
        this.topic = topic;
        this.status = status;
        this.likes = likes;
        this.comments = comments;
        this.texs = texs;
    }
}